<?php if(Yii::app()->user->hasFlash('register')): ?>

<div class="flash-success">
    <?php echo Yii::app()->user->getFlash('register'); ?>
</div>

<?php else: ?>

<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'login-form',
    'enableClientValidation'=>true,
    'clientOptions'=>array(
        'validateOnSubmit'=>true,
    ),
)); ?>
    <table>
        <tr>
            <td align="right">
                <?php echo $form->labelEx($model,'login'); ?>
            </td>
            <td align="left">
                <?php echo $form->textField($model,'login'); ?>
                <?php echo $form->error($model,'login'); ?>
            </td>
        </tr>

        <tr>
            <td align="right">
                <?php echo $form->labelEx($model,'password'); ?>
            </td>
            <td align="left">
                <?php echo $form->passwordField($model,'password'); ?>
                <?php echo $form->error($model,'password'); ?>
            </td>
        </tr>

        <?php if(Yii::app()->params['openIdEnabled']): ?>
        <tr>
            <td align="right">
                <?php echo $form->labelEx($model,'indentity_url'); ?>
            </td>
            <td align="left">
                <?php echo $form->textField($model,'indentity_url'); ?>
                <?php echo $form->error($model,'indentity_url'); ?>
            </td>
        </tr>
        <?php endif; ?>

        <tr>
            <td align="right">
            </td>
            <td align="left">
                <?php if(Yii::app()->user->allowAutoLogin): ?>
                <?php echo $form->checkBox($model,'rememberMe'); ?>
                <?php echo $form->label($model,'rememberMe'); ?>
                <?php echo $form->error($model,'rememberMe'); ?>
                <?php endif; ?>
            </td>
        </tr>

        <tr>
            <td align="left">
                <?php if(Yii::app()->params['lostPassword']): ?>
                <a href="<?php echo $this->createUrl('account/lost_password'); ?>"><?php echo Yii::t('account','Lost password') ?></a>
                <?php endif; ?>
            </td>
            <td align="right">
                <?php echo CHtml::submitButton('Login'); ?>
            </td>
        </tr>

    </table>

<?php $this->endWidget(); ?>

<?php endif; ?>